package com.wkbb.common.enums;

public enum ButtonTypeEnum {

    BUTTON_ADD("添加","add"),
    BUTTON_EDIT("编辑","edit"),
    BUTTON_DELETE("删除","delete"),
    BUTTON_VIEW("详情","view"),
    BUTTON_ENABLE("启用","enable"),
    BUTTON_DISABLE("停用","disable"),
    BUTTON_IMPORT("导入","import"),
    BUTTON_EXPORT("导出","export"),
    BUTTON_AUDIT("审核","audit"),
    BUTTON_PASS("通过","pass"),
    BUTTON_NOPASS("不通过","nopass"),
    BUTTON_OPEN("开通","open");

    private ButtonTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    public String getValue() {
        return this.value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(String value) {
        for (ButtonTypeEnum buttonTypeEnum : ButtonTypeEnum.values()) {
            if (buttonTypeEnum.getValue().equals(value)) {
                return buttonTypeEnum.getDesc();
            }
        }
        return null;
    }
}
